<template>
  <div>
    <My-Header ref="HeaderEle"/>
    <button @click="getEle">点我获取Header</button>
    <hr>
    <Count />
  </div>
</template>

<script>
//引入组件
import MyHeader from "./components/MyHeader"
import Count from "./components/Count"
export default {
  name:"App",
  components:{
    //注册组件
    MyHeader,
    Count
  },
  methods:{
    getEle(){
      console.log(this.$refs.HeaderEle);
    }
  }
}
</script>

<style scoped>

</style>